package com.github.bridge.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.bridge.domain.SysConfig;
import com.github.bridge.mapper.WeightConfigMapper;
import com.github.bridge.service.WeightConfigService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RequiredArgsConstructor
public class WeightConfigServiceImpl extends ServiceImpl<WeightConfigMapper, SysConfig> implements WeightConfigService {
    private final WeightConfigMapper weightConfigMapper;


    @Override
    public SysConfig findBySystemId(String systemId) {
        LambdaQueryWrapper<SysConfig> query = Wrappers.lambdaQuery(SysConfig.class);
        query.eq(SysConfig::getSystemId, systemId);
        return weightConfigMapper.selectOne(query);
    }
}
